home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Makefiles / language.make < prev    next >
Encoding:
Text File  |  1995-04-12  |  1.8 KB  |  66 lines

  1. #
  2. # language.make
  3. # Copyright (C) 1995 Stephan Wacker
  4. # 94-12-25
  5. #
  6. # Put this line into your Makefile.preamble:
  7. #    LOCALMAKEDIR = /LocalDeveloper/Makefiles
  8. #
  9. # And this goes to the end of Makefile.postamble:
  10. #    include $(LOCALMAKEDIR)/language.make
  11. #
  12. # Inputs from Makefile.preamble:
  13. #    OTHER_LANGUAGES - list of languages for which you have written
  14. #        localized resources, e.g.  ``French German Spanish''
  15. #
  16.  
  17.  
  18. project:: other_languages_resources
  19.  
  20. other_languages_resources:
  21.     @( for lang in $(OTHER_LANGUAGES) none ; do \
  22.         if [ $$lang = "none" ] ; then break; fi ; \
  23.         $(ECHO) ==== $(NAME): Making other language: $$lang ==== ; \
  24.         $(MAKE) clean_resources resources \
  25.         "LANGUAGE = $$lang" \
  26.         "PRODUCT_ROOT = $(PRODUCT_ROOT)" \
  27.         "APP_MAKEFILE_DIR = $(APP_MAKEFILE_DIR)" ; \
  28.     done )
  29.  
  30. clean_resources:: clean_help
  31.  
  32.  
  33.  
  34. $(NAME).copy:: other_languages_copy
  35.  
  36. other_languages_copy:
  37.     @( for lang in $(OTHER_LANGUAGES) none ; do \
  38.         if [ $$lang = "none" ] ; then break; fi ; \
  39.         $(MKDIRS) $(DEST)/$$lang.lproj ; \
  40.         if [ "$(LOCAL_RESOURCES)" != "" ] ; then \
  41.         $(ECHO) "(cd $$lang.lproj; $(TAR) chf - $(LOCAL_RESOURCES)) | (cd $(DEST)/$$lang.lproj; $(TAR) xf - )" ; \
  42.         (cd $$lang.lproj; $(TAR) chf - $(LOCAL_RESOURCES)) | (cd $(DEST)/$$lang.lproj; $(TAR) xf -) ; \
  43.         fi ; \
  44.        done )
  45.  
  46.  
  47.  
  48. #
  49. # compresshelp always complains about files in "*.rtfd~" directories.
  50. # This target (clean_help) must be processed before the resources target.
  51. # This can be achieved by making it a toplevel subcomponent; alas, this will
  52. # not be sufficient if there are other Help directories in subprojects or
  53. # bundles.
  54. #
  55.  
  56. toplevel_subcomponents:: clean_help
  57.  
  58. clean_help: 
  59.     @( for d in $(HELP_DIRS) $(OTHER_HELP_DIRS); do \
  60.         if [ -d $$d ] ; then \
  61.          find $d -name "*~" -print | xargs $(RM) -rf ; \
  62.         fi ; \
  63.        done )
  64.  
  65.  
  66.